package com.bawei.common.adapter

import com.bawei.common.entity.BannerEntity
import com.bawei.image.ImageLoadStrategy
import com.bawei.image.ImageLoadUtil
import com.youth.banner.adapter.BannerImageAdapter
import com.youth.banner.holder.BannerImageHolder

/**
 * Author: Jason Zhang
 * Date: 2024/8/22
 * Desc: 图片Banner适配器
 */
class ImageBannerAdapter(data: MutableList<BannerEntity>): BannerImageAdapter<BannerEntity>(data) {
    override fun onBindView(holder: BannerImageHolder, data: BannerEntity, position: Int, size: Int) {
        ImageLoadUtil.with(holder.itemView.context).loadResource(data.resId).into(holder.imageView)
    }
}